//Function to reencode strings for XML
var txt;
txt=argument0
txt=string_replace_all(txt,"&","&amp")
txt=string_replace_all(txt,"<","&lt")
txt=string_replace_all(txt,">","&rt")
txt=string_replace_all(txt,"'","&apos")
txt=string_replace_all(txt,'"',"&quot")
txt=string_replace_all(txt,"=","&equ")
txt=string_replace_all(txt,chr(10),"&br")
return txt
